﻿<!DOCTYPE html>
<html>
	<head>
		<meta name="Generator" content="ECJIA 1.37" />
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0, minimal-ui, viewport-fit=cover">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="format-detection" content="telephone=no" />
		<title>所有分类-ECJia到家 - 同城上门O2O解决方案</title>
		<link href="https://cityo2o.ecjia.com/content/uploads/data/assets/ecjia-intro/wap_logo.png" rel="shortcut icon bookmark">
		<link href="https://cityo2o.ecjia.com/content/uploads/data/assets/ecjia-intro/wap_logo.png" rel="apple-touch-icon-precomposed">

		<link rel="stylesheet" type="text/css" href="/lahuo/css/H5phone/daodianquhuan_files/common@ee713f7a54.css">
		<link rel="stylesheet" type="text/css" href="/lahuo/css/H5phone/daodianquhuan_files/zcbase@b22e88b759.css">
		<link rel="stylesheet" type="text/css" href="/lahuo/css/H5phone/daodianquhuan_files/zcorder@ccf5099280.css">
		<link rel="stylesheet" type="text/css" href="/lahuo/js/H5phone/js/styles.css" media="all">
		<script type="text/javascript" src="/lahuo/js/H5phone/js/jquery.js"></script>
		<script type="text/javascript" src="/lahuo/js/H5phone/js/moment.js"></script>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=c0RcpyytG9qNmxZR7AhRIm6hvNG2EZBG"></script>
		<script type="text/javascript" src="/lahuo/js/H5phone/js/bootstrap-datetimepicker.js"></script>
		<link rel="stylesheet" href="/lahuo/static/css/bootstrap.css">

		<link rel="stylesheet" href="/lahuo/static/css/iconfont.min.css">
		<link rel="stylesheet" href="/lahuo/static/css/ecjia.touch.css">
		<link rel="stylesheet" href="/lahuo/static/css/ecjia.touch.develop.css">
		<link rel="stylesheet" href="/lahuo/static/css/ecjia.touch.b2b2c.css">
		<link rel="stylesheet" href="/lahuo/static/css/ecjia_city.css">
		<link rel="stylesheet" href="/lahuo/static/css/ecjia_help.css">

		<link rel="stylesheet" href="/lahuo/static/css/ecjia.touch.models.css">
		<link rel="stylesheet" href="/lahuo/static/css/swiper.min.css">
		<link rel="stylesheet" href="/lahuo/static/css/datepicker.min.css">
		<link rel="stylesheet" href="/lahuo/static/css/windercheck.min.css">

		<link rel="stylesheet" href="/lahuo/static/css/photoswipe.css">
		<link rel="stylesheet" href="/lahuo/static/css/default-skin.css">

		<link rel="stylesheet" href="/lahuo/static/css/style.css">
		<link rel="stylesheet" href="/lahuo/static/css/iosoverlay.css">
		<meta name="apple-itunes-app" content="app-id=1118895347, app-argument=https://cityo2o.ecjia.com/sites/m/index.php?m=goods&c=category&a=init">
	</head>

	<body onload="inits()">
		<div>
		<header class="zc_header_bd">
		<div class="getback" style="white-space: normal" data-url="">
			<span class="getbackimg">&nbsp;</span>
		</div>
		
		<h1 class="header_title" id="page_title">到店取还</h1>
		<div class="homeback">
			<span class="homebackimg">&nbsp;</span>
		</div>
	</header>
		<div class="ecjia" style="height: 100%;" id="get_location" data-url="https://cityo2o.ecjia.com/sites/m/index.php?m=touch&c=location&a=get_location_msg">
			<input type="hidden" name="key" value="HVNBZ-HHR3P-HVBDP-LID55-D2YM3-2AF2W" />
			<input type="hidden" name="referer" value="ecjiaapp" />

			<div class="ecjia-mod category">				
				<ul class="ecjia-list category_left">
				<#list listall as listalls>
					<li class=""><!-- active -->
						<a href="javascript:;" id="target" class="cartype" data-rh="1" dateprice="${listalls.price}"  dateid="${listalls.id}" data-val="1032">${listalls.carname}</a>
					</li>
					</#list>
					
				</ul>
				<div class="category_right">
					<div class="cat_list ecjia-category-list show" id="category_1032">
						<a class="img"  href="https://cityo2o.ecjia.com/sites/m/index.php?m=goods&c=category&a=store_list&cid=1032">
							
						</a>
						<div>
							<div class="hd">
								
		                    <span class="line"></span>
		                    <p style="color: #7E7E7E; font-size: 10px; text-align: center;">
		                    	载重：<span id="load">1</span>吨<br/>
		                    	长*宽*高：<span id="lwh"></span><br/>
		                    	容积：<span id="cubage"></span>方
		                   </p>
		             
							</div>
						<div class="hotel-page-pt50 rentpage">
		
	
		<div class="mainbox">
			<ul class="dzul mt10">
				<span class="qcbicon dzicon"></span>
				<li class="dztext dzcheng">发货地址</li>
				<li class="dzcity dzcheng faaddress" style="font-size: 10px;" id="fcnbox" data-type="rentCity"
					data-url="/jump/toCity">
					<#if addressa??>
					${addressa}<#else>洛阳</#if>
				</li>
			
			</ul>
		
			<ul class="dzul">
				<span class="hcbicon dzicon"></span>
				<li class="dztext dzcheng">收货地址</li>
				<li class="dzcity dzcheng shouaddress" id="tcnbox" style="font-size: 10px;" data-type="returnCity"
					data-url="/jump/toCity">
					<#if addressb??>
					${addressb}<#else>郑州</#if>
				</li>
				
			</ul>
		
			<div class="dztime brbotda" style="min-height: 100px;">
				<div class="fl w30" data-type="rentTime" id="rentTime picktime"
					data-url="/html5/newversion/rent/rentdate.html">
					<p class="title">取车时间</p>
					<input type="text" value="减一辆" readonly="readonly" class="dd gg" id="rentDate-time"
						style="font-size: 15px;  text-align: center; color: red" />
				</div>
				<div class="fl w40">
					<div style="margin-top: 10px; " class="number">1</div>
				</div>
				<div class="fl w30" data-type="returnTime" id="returnTime"
					data-url="/html5/newversion/rent/returndate.html">
					<p class="title">还车时间</p>
					<input type="text" value="加一辆" readonly="readonly" class="dd mm" id="returnDate-time"
						style="font-size: 15px; text-align: center; color: red" />
<!--  style="position: absolute; right: 110px;top:339px;" -->
				</div><span  id ="price" style="font-size:16px; color: red"></span>
                <span  id="priceorder"  style="float: right;" >价格明细</span>
			</div>
			<#if addressa??||addressb??>
        <input type ="hidden" value="${lntone}" id="lntone">
		<input type ="hidden" value="${latone}" id="latone">
		<input type ="hidden" value="${lnttwo}" id="lnttwo">
		<input type ="hidden" value="${lattwo}" id="lattwo">	
			<#else>      
	    <input type ="hidden" value="112.409451" id="lntone">
		<input type ="hidden" value="34.662518" id="latone">
		<input type ="hidden" value="113.661999" id="lnttwo">
		<input type ="hidden" value="34.752655" id="lattwo">	
		</#if>
<input type ="hidden" id="cartype">
<input type="hidden" id="prices">
<input type="hidden" id="money"><!-- 一辆车行程的总价 -->
<input type="hidden" id="mile"><!-- 两个位置的距离 -->
<input type="hidden" id="carid">
		</div>

	

		
		<div id="selectCar" style="margin-top: 20px;">
			<a href="" class="btn-ordernow">立即去</a>
		</div>
	</div>

						</div>

					</div>
				</div>
				
			</div>
			
		

		</div>
		
		
</div>
		<script charset="utf-8" src="/lahuo/static/js/4c5b4df75eb149d49d5247462472ddbc.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/jquery.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/jquery.quicksearch.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/jquery.pjax.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/jquery.cookie.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/iscroll.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/jquery.form.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/clipboard.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/geolocation.min.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/jquery.localstorage.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/photoswipe.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/photoswipe-ui-default.min.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.koala.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.others.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.goods.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.user.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.flow.js"></script>

		<script type="text/javascript">
			var theme_url = "https://cityo2o.ecjia.com/sites/m/content/themes/h5/";
		</script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.goods_detail.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.spread.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.user_account.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.franchisee.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.comment.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.raty.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.fly.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.quickpay.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.share.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/ecjia.touch.intro.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/validform_v5.3.2_min.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/swiper.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/datepicker.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/windercheck.min.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/greencheck.js"></script>

		<script type="text/javascript" src="/lahuo/static/js/iosoverlay.js"></script>
		<script type="text/javascript" src="/lahuo/static/js/prettify.js"></script>

		<script type="text/javascript">
			ecjia.touch.category.init();
		</script>

		<script type="text/javascript">
		
			var hidenav = 0,
				hidetab = 0,
				hideinfo = 0;
			if(hideinfo) {
				$('header').hide();
				$('footer').hide();
				$('.ecjia-menu').hide();
			} else {
				hidenav && $('header').hide();
				hidetab && $('footer').hide();
			}
		</script>
		<!-- 选择地址，付款 -->
		<script type="text/javascript">
		
		$(".btn-ordernow").click(function(){
			var obb=$(this);
		    var id=$("#carid").val();
		    var numbers=$(".number").text();
		    var prices=$("#price").text();
		    var price=prices.slice(1);
			var faaddress=$(".faaddress").text();
			var shouaddress=$(".shouaddress").text();
			var falnt=$("#lntone").val();
			var falat=$("#latone").val();
			var shoulnt=$("#lnttwo").val();
			var shoulat=$("#lattwo").val();
			location.href="/lahuo/tomyorder?id="+id+"&numbers="+numbers+"&price="+price+"&faaddress="+faaddress+"&shouaddress="+shouaddress+"&falnt="+falnt+"&falat="+falat+"&shoulnt="+shoulnt+"&shoulat="+shoulat;
		})
		
		
		
		$(".faaddress").click(function(){
			var fashou="发货地址";
			location.href="/lahuo/toaddress?id=1&fashou="+fashou;
		});
		$(".shouaddress").click(function(){
			var fashou="收货地址";
			location.href="/lahuo/toaddress?id=2&fashou="+fashou;
		});
		
		function inits(){
			
			 document.getElementById("target").click();
			
		}
		
		
		
		function init(){
			var lntone =$("#lntone").val();
			var latone =$("#latone").val();
			var lnttwo =$("#lnttwo").val();
			var lattwo =$("#lattwo").val();
			var pointA = new BMap.Point(lntone, latone);
			var pointB = new BMap.Point(lnttwo, lattwo);
			var mile = GetDistance(pointA.lat, pointA.lng, pointB.lat, pointB.lng);
			
			var miles=parseInt(mile);
			$("#mile").val(miles);
			var cartype=$("#cartype").val();
		var prices=$("#prices").val()
		var pricess=parseFloat(prices);
				var pricee=miles*pricess;
				$("#price").text("￥"+pricee);
				 var pri=parseInt(pricee);
				 $("#money").val(pricee);
				 var number=$(".number").text();
				 var numbers=parseInt(number);
				 var pr=pri*numbers;
				 $("#price").text("￥"+pr);
				 
		};
		$("#priceorder").click(function(){
			var mile=$("#mile").val();
		    var zprice=$("#price").text();
		    alert("行程里程("+mile+"公里): \n "+zprice+"")
		});
		
		//加一辆
		$(".mm").click(function(){
			
			var number=$(".number").text();
			var numbe=parseInt(number);
			var pricesss=$("#price").text();
			var price=pricesss.slice(1);
			var pric=parseInt(price);
			var numbers=numbe+1;
			var money=$("#money").val();
			var mon=parseInt(money);
			
			var prices=parseInt(pric)+ parseInt(mon);
			$(".number").text(numbers);
			$("#price").text("￥"+prices);
			
		});
		//减一辆
		$(".gg").click(function(){
			var number=$(".number").text();
			var numbe=parseInt(number);
			var pricesss=$("#price").text();
			var price=pricesss.slice(1);
			var pric=parseInt(price);
			var numbers=numbe-1;
			if(numbers<1){
				alert("回去吧,弟弟");
				return;
			}
			var money=$("#money").val();
			var mon=parseInt(money);
			
			var prices=parseInt(pric)- parseInt(mon);
			$(".number").text(numbers);
			$("#price").text("￥"+prices);
			
		});
		
		

		function Rad(d) {
			return d * Math.PI / 180.0; //经纬度转换成三角函数中度分表形式。
		}
		function GetDistance(lat1, lng1, lat2, lng2) {
			var radLat1 = Rad(lat1);
			var radLat2 = Rad(lat2);
			var a = radLat1 - radLat2;
			var b = Rad(lng1) - Rad(lng2);
			var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
			s = s * 6378.137; // 地球半径，千米;
			s = Math.round(s * 10000) / 10000; //输出为公里
			/* s = Math.round(s * 1000) / 1; //单位修改为米,取整*/
			//s=s.toFixed(4);
			return s;
		}
		
		$(".cartype").click(function(){
			$(".img").text("");
		var obb=$(this);
		var id =obb.attr("dateid");
		$("#carid").val(id);
			var price=obb.attr("dateprice");
			$("#prices").val(price);
			
			$.ajax({
				type:"GET",
				url:"/lahuo/carinfo",
				data:{id:id},
				dataType:"json",
				success:function(data){
				
				$(".img").append('<img width="250" height="130" src="static/picture/'+data.logo+'">')
				$("#cartype").val(data.carname);
				$("#load").text(data.load);
				$("#lwh").text(data.lwh);
				$("#cubage").text(data.cubage);
				init();
				},
				error:function(data){
					alert("对不起，查询失败");
				}
			});
		})
	
		</script>
		
		<script type="text/javascript">
		
			//短信公众号过来不要返回
			//console.log(ssgivalue);
			$(".circtip").click(function() {
				window.location.href = "/html5/newversion/info/packagehelp.html";
			});
			window.addEventListener('DOMContentLoaded', function() {
				if($('.yearrent').hasClass('current')) {
					$('.nav-box .tab-nav').scrollLeft(360);
				}
			});

		/* 	$("#fsnbox").click(
				function() {
					var city = $(this).parents(".mainbox").find("#fcnbox")
						.text().trim();
					var local = $("#tsnbox").attr("data-url") + "?place=" +
						city;
					var type = $(".dztext.dzcheng.defsmsc").data("type");
					window.location.href = local + "&zctype=1" + "&smtype=" + type;
				})
			$("#tsnbox").click(
				function() {
					var city = $(this).parents(".mainbox").find("#tcnbox")
						.text().trim();
					var local = $("#tsnbox").attr("data-url") + "?place=" +
						city;
					var type = $(".dztext.dzcheng.defsmqc").data("type");
					window.location.href = local + "&zctype=2" + "&smtype=" + type;
				}) */
		/* 	$("#fcnbox").click(function() {
				var city = $(this).text().trim();
				var local = $("#fcnbox").attr("data-url");
				var type = $(".dztext.dzcheng.defsmsc").data("type");
				window.location.href = local + "?city=" + city + "&zctype=" + "1" + "&smtype=" + type;
			})
			$("#tcnbox").click(function() {
				var city = $(this).text().trim();
				var local = $("#tcnbox").attr("data-url");
				var type = $(".dztext.dzcheng.defsmqc").data("type");
				window.location.href = local + "?city=" + city + "&zctype=" + "2" + "&smtype=" + type;
			}) */
			
			$(".getback").click(function() {
				window.location.href = "/jump/toPhoneHomePage";
			});
			var num = 1;
			$('.sccur').click(function(e) {
				if(num++ % 2 == 0) {
					var color = $(this).parent().css("background-color");
					if(color == "rgb(255, 194, 0)") {
						$(this).removeClass("move");
						$(this).parent().css("background-color", "white");
						$(".dztext.dzcheng.defsmsc").text("取车门店");
						var type = $(".dztext.dzcheng.defsmsc").data("type");
						if(type == "1") {
							$(".dztext.dzcheng.defsmsc").data("type", "2");
							console.log($(".dztext.dzcheng.defsmsc").data("type"));
						} else {
							$(".dztext.dzcheng.defsmsc").data("type", "1");
							console.log($(".dztext.dzcheng.defsmsc").data("type"));
						}
					} else {
						$(this).addClass("move");
						$(this).parent().css("background-color", "#FFC200");
						$(".dztext.dzcheng.defsmsc").text("取车地址");
						var type = $(".dztext.dzcheng.defsmsc").eq(0).data("type");
						if(type == "1") {
							$(".dztext.dzcheng.defsmsc").eq(0).data("type", "2");
							console.log($(".dztext.dzcheng.defsmsc").data("type"));
						} else {
							$(".dztext.dzcheng.defsmsc").eq(0).data("type", "1");
							console.log($(".dztext.dzcheng.defsmsc").data("type"));
						}
					}
					//doSomething 
				} else {
					$(this).removeClass("move");
					$(this).parent().css("background-color", "white");
					$(".dztext.dzcheng.defsmsc").text("取车门店");
					var type = $(".dztext.dzcheng.defsmsc").eq(0).data("type");
					if(type == "1") {
						$(".dztext.dzcheng.defsmsc").eq(0).data("type", "2");
						console.log($(".dztext.dzcheng.defsmsc").data("type"));
					} else {
						$(".dztext.dzcheng.defsmsc").eq(0).data("type", "1");
					}
					//doOtherSomething 
				}
				e.preventDefault(); //阻止元素的默认动作（如果存在） 
			});
			var i = 1;
			/* $('.scur').click(function(e) {
				if(i++ % 2 == 0) {
					var color = $(this).parent().css("background-color");
					if(color == "rgb(255, 194, 0)") {
						$(this).removeClass("move");
						$(this).parent().css("background-color", "white");
						$(".dztext.dzcheng.defsmqc").text("取车门店");
						var type = $(".dztext.dzcheng.defsmqc").data("type");
						if(type == "1") {
							$(".dztext.dzcheng.defsmqc").data("type", "2");
							console.log($(".dztext.dzcheng.defsmqc").data("type"));
						} else {
							$(".dztext.dzcheng.defsmqc").data("type", "1");
							console.log($(".dztext.dzcheng.defsmqc").data("type"));
						}
					} else {
						$(this).addClass("move");
						$(this).parent().css("background-color", "#FFC200");
						$(".dztext.dzcheng.defsmqc").text("取车地址");
						var type = $(".dztext.dzcheng.defsmqc").eq(0).data("type");
						if(type == "1") {
							$(".dztext.dzcheng.defsmqc").eq(0).data("type", "2");
							console.log($(".dztext.dzcheng.defsmqc").data("type"));
						} else {
							$(".dztext.dzcheng.defsmqc").eq(0).data("type", "1");
							console.log($(".dztext.dzcheng.defsmqc").data("type"));
						}
					}
					//doSomething 
				} else {
					$(this).removeClass("move");
					$(this).parent().css("background-color", "white");
					$(".dztext.dzcheng.defsmqc").text("取车门店");
					var type = $(".dztext.dzcheng.defsmqc").eq(0).data("type");
					if(type == "1") {
						$(".dztext.dzcheng.defsmqc").eq(0).data("type", "2");
						console.log($(".dztext.dzcheng.defsmqc").data("type"));
					} else {
						$(".dztext.dzcheng.defsmqc").eq(0).data("type", "1");
						console.log($(".dztext.dzcheng.defsmqc").data("type"));
					}
					//doOtherSomething 
				}
				e.preventDefault(); //阻止元素的默认动作（如果存在） 
			}); */
		</script>
	</body>

</html>